#pragma once

namespace DLNLib
{


class Data
{
public:
	Data(void);
	
	Data(const Data& rhs)
		:time(rhs.time)
		,value(rhs.value){}
	
	~Data(void);
	const Data& operator=(const Data& rhs);
	bool  operator ==(const Data& rhs)
	{
		return( time == rhs.time && 
			value== rhs.value);			
	}
	bool  operator !=(const Data& rhs)
	{
		return !(*this == rhs);
	}
	
	operator CString()
	{
		CString strData;
		char* DLNFmt = "%02d:%02d:%02d	%02d.%02d.%04d	%.3f			";
		strData.Format(DLNFmt,
			time.GetHour(),
			time.GetMinute(),
			time.GetSecond(),
			time.GetDay(),
			time.GetMonth(),
			time.GetYear(),
			value);
		return strData;
	}
	COleDateTime time;
	float        value;
};

Data* Parse( char* line );
bool  Parse2( Data& rD,char* line);
}